@layout("/common/_container.html",{js:["/assets/modular/goods/goods.js"]}){

<div class="layui-body-header">
    <span class="layui-body-header-title">商品信息管理</span>
</div>

<div class="layui-fluid">
    <div class="layui-row layui-col-space15">
        <div class="layui-col-sm12 layui-col-md12 layui-col-lg12">
            <div class="layui-card" id="hello">
                <div class="layui-card-body">
                    <div class="layui-form toolbar">
                        <div class="layui-form-item">

                            <div class="layui-inline">
                                <input id="parentId" class="layui-input" type="hidden" placeholder="商品种类"/>
                                <input id="pName" class="layui-input" type="text" placeholder="商品种类" readonly/>
                            </div>
                            <div class="layui-inline">
                                <input id="goodsNo" class="layui-input" type="text" placeholder="商品编号"/>
                            </div>
                            <div class="layui-inline">
                                <input id="batchNo" class="layui-input" type="text" placeholder="批次号"/>
                            </div>
                            <div class="layui-inline">
                                <input id="labelId" class="layui-input" type="hidden" placeholder="商品标签"/>
                                <input id="labelName" class="layui-input" type="text" placeholder="商品标签" readonly/>
                            </div>
                            <div class="layui-inline">
                                <input id="name" class="layui-input" type="text" placeholder="商品名"/>
                            </div>
                            <div class="layui-inline">
                                <select name="商品状态"  id="status">
                                    <option value="">全部</option>
                                    <option value="1">上架</option>
                                    <option value="0">下架</option>
                                </select>
                            </div>
                        </div>
                        <div class="layui-form-item">
                            <div class="layui-inline">
                                    <button id="btnSearch" class="layui-btn icon-btn"><i class="layui-icon">&#xe615;</i>搜索</button>
                                @if(shiro.hasPermission("/goods/add")){
                                    <button id="btnAdd" class="layui-btn icon-btn"><i class="layui-icon">&#xe654;</i>添加</button>
                                @}
                                    <button id="btnExp" class="layui-btn icon-btn"><i class="layui-icon">&#xe67d;</i>导出</button>
                            </div>
                        </div>
                    </div>
                    <table class="layui-table" id="goodsTable" lay-filter="goodsTable"></table>
                </div>
            </div>
        </div>
    </div>
</div>

<script type="text/html" id="tableBar">
    @if(shiro.hasPermission("/goods/edit")){
        <a class="layui-btn  layui-btn-xs icon-btn" lay-event="edit">编辑</a>
    @}
    @if(shiro.hasPermission("/goods/delete") ){
        <a class="layui-btn layui-btn-danger layui-btn-xs" lay-event="delete">删除</a>
    @}
    @if(shiro.hasPermission("/goods/detail") ){
    <a class="layui-btn  layui-btn-xs icon-btn" lay-event="detail">查看</a>
    @}
</script>

<script type="text/html" id="statusTpl" >
    <input type="checkbox" lay-filter="status" value="{{d.id}}" lay-skin="switch"  lay-text="上架|下架"
           @if(!shiro.hasPermission("/goods/edit") ){
                disabled
           @}
           {{d.status=='1'?'checked':''}} />
</script>
@}